/* 影视中心页面样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #f8f9fa;
    --border-color: #eaeaea;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #fff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.movie-container {
    padding: 20px 0;
    max-width: 1200px; /* 更宽的布局 */
    width: 100%;
    margin: 0 auto;
}

/* 资源菜单样式 */
.resource-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
    background-color: #2c3e50;
    padding: 10px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.resource-item {
    margin: 5px 10px; /* 减小间距以适应移动端 */
    padding: 8px 15px;
    border-radius: 6px;
    background-color: transparent;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.resource-item:hover,
.resource-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #3498db;
    transform: translateY(-2px);
}

/* 搜索栏样式 */
.movie-search {
    margin-bottom: 30px;
}

.movie-search form {
    display: flex;
    max-width: 700px; /* 增加宽度 */
    margin: 0 auto;
}

.movie-search input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
}

.movie-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.movie-search button {
    padding: 0 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.movie-search button:hover {
    background-color: #e05a5a;
}

/* 分类导航样式 */
.movie-nav {
    margin-bottom: 30px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.category-group {
    margin-bottom: 20px;
}

.category-group:last-child {
    margin-bottom: 0;
}

.category-group h3 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    padding: 8px 16px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.category-item:hover, .category-item.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 影片列表样式 */
.movie-list {
    margin-bottom: 40px;
}

.movie-list h2 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 稍大的卡片 */
    gap: 25px; /* 增加间距 */
}

.movie-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.movie-item a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-poster {
    position: relative;
    padding-top: 140%; /* 高宽比约为10:7 */
    overflow: hidden;
    flex-shrink: 0;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-item:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-remarks {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px 0 0 0;
}

.movie-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-title {
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.movie-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 15px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    margin: 2px;
}

.page-link:hover, .page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 无结果提示 */
.no-results {
    padding: 40px 0;
    text-align: center;
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.no-results p {
    font-size: 18px;
    color: var(--text-light);
}

/* 响应式样式 */
@media (max-width: 991px) {
    .movie-container {
        max-width: 100%;
        padding: 20px 15px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .movie-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .movie-meta {
        font-size: 11px;
    }
    
    .resource-menu {
        padding: 10px 5px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch; /* 加速滚动 */
    }
    
    .category-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .movie-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .movie-info {
        padding: 8px;
    }
    
    .movie-title {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .category-item {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .movie-search input {
        padding: 10px;
        font-size: 14px;
    }
    
    .movie-search button {
        padding: 0 15px;
        font-size: 14px;
    }
    
    .movie-list h2 {
        font-size: 20px;
    }
} 